package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.SaleCount;
import com.atguigu.jxc.entity.SaleData;
import com.atguigu.jxc.entity.SaleListGoods;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Mapper
@Component
public interface SaleListGoodsDao {
    //保存销售商品
    void save(SaleListGoods saleListGoods);
    //查询销售单中的商品
    List<SaleListGoods> selectByListId(Integer saleListId);
    //删除销售单中的商品
    void deleteByListId(Integer saleListId);
    //统计销售商品
    List<SaleCount> selectCount(Date start, Date end, Integer goodsTypeId, String codeOrName);
    //按日统计
    List<SaleData> getSaleDateByDay(Date start, Date end);
    //按月统计
    List<SaleData> getSaleDateByMonth(Date start, Date end);

}
